package programm;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class DBmanager {
        private static EntityManager em;    //o entity manager


    /**
     * Creates new form MainMenuGUI
     */
    public void dbmanager() {
     try {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("RadioStation_appPU");
        em = emf.createEntityManager();
     } catch (Exception e) {
          System.out.println("ERROR:¨"+e.getMessage());
       }  
    }
    
    public EntityManager getEm() {
        return em;
    }
}